package cn.edu.scau.cmi.wujiaxian.exercise4;

import java.util.Scanner;

public class Electric {
	public static void main(String[] args) {
		Scanner reader = new Scanner(System.in);
		System.out.println("请输入你的用电量:");
		double a = reader.nextDouble();
		double sum = 0;
		if (a <= 90) {
			sum = a * 0.6;
		} else if (a <= 150) {
			sum = 54 + (a - 90) * 1.1;
		} else {
			sum = 120 + (a - 150) * 1.7;
		}
		System.out.println("你的电费是：" + sum);
		reader.close();
	}
}
